package com.xliang.spider.version04.dao.impl;

import com.xliang.spider.version04.dao.impl.base.BaseDaoImpl;
import com.xliang.spider.version04.dao.SpiderLessonDao;
import com.xliang.spider.version04.pojo.LessonEntity;
import org.springframework.stereotype.Repository;

/**
 * ${DESCRIPTION}
 *
 * @author xiongl
 * @create 2016-06-21 14:28
 */
@Repository
public class SpiderLessonDaoImpl extends BaseDaoImpl implements SpiderLessonDao
{
    @Override
    public LessonEntity findLessonOne()
        throws Exception
    {
        return getSqlSession().selectOne("LessonMapper.findLessonOne");
    }
    
    @Override
    public int insertLesson(LessonEntity lesson)
        throws Exception
    {
        return getSqlSession().insert("LessonMapper.insertLesson", lesson);
    }
    
    @Override
    public int updateLesson(LessonEntity lesson)
        throws Exception
    {
        return getSqlSession().update("LessonMapper.updateLesson", lesson);
    }
}
